<?php

namespace app\admin\controller;

use think\Controller;
use think\Request;

class Base extends Controller
{
    public  function __construct(){

        if(!session('?msg_info')){
            $this->error("你还没登陆，请先登陆亲",'admin/login/index');
        }

    }

    // 退出登录
    public function logoutExit()
    {
        session(null);
        $this->success('您已经退出登录','admin/login/index');
    }

    // 前台退出
    public function IndexExit()
    {
        session(null);
        $this->success('您已经退出登录','index/index/index');
    }
}
